
#include <iostream>
#include "Student.h"
using namespace std;


Student::Student() :m_id(0), m_name("Unknown"){}


Student::Student(int id,string name)
        : m_id(id),m_name(name){}




void Student::print() const {
    cout << "Name: " << m_name << ", Id: " << m_id << endl;
}

const string& Student::getName() const {
    return m_name;
}
int Student::getId() const {
    return m_id;
}
void Student::setName(const string &name) {
    this->m_name = name;
}
void Student::setId(int id) {
    this->m_id = id;
}

void Student::reflect() {
    cout<<"Id:"<<m_id<<"  Name:"<<m_name<<" ";
}


istream& operator>>(istream& in, Student& stu) {
    return stu.readFrom(in);
}

